<template>
  <div class>
    <!--面包屑-->
    <Breadcrumb :Breadcrumb="Breadcrumb"></Breadcrumb>
    <div class="banner">
      <div class="pic">
        <img :src="infoData.logoUrl" alt />
      </div>
      <div class="companyName">
        <h3>{{infoData.name}}</h3>
      </div>
      <div class="companyDetail">
        <div class="box">
          <span class="a">公司简称：</span>
          <span>{{infoData.shortName}}</span>
        </div>
        <div class="box">
          <span class="a">监督单位：</span>
          <span>{{infoData.monitorUnit}}</span>
        </div>
        <div class="box1">
          <div class="a">公司简介：</div>
          <div class="text" v-html='infoData.introduction'></div>
        </div>
        <div class="map">
          <div class="a">位置标注：</div>
          <div class="mapOne">
            <baidu-map class="bm-view" :center="form" :zoom="15" :scroll-wheel-zoom="true">
              <bm-marker :position="form" animation="BMAP_ANIMATION_BOUNCE"></bm-marker>
            </baidu-map>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
//面包靴
import Breadcrumb from "@/components/IncorruptibleArchives/Breadcrumb.vue";
import BaiduMap from "vue-baidu-map/components/map/Map.vue";
export default {
  components: {
    Breadcrumb,
    BaiduMap,
  },
  data() {
    return {
      // 百度地图
      form:{lng: 0, lat: 0},
      infoData:{},
      //面包靴跳转数据
      Breadcrumb: [
        {
          name: "廉政档案",
          link: "IncorruptibleArchives",
        },
        {
          name: "公司档案",
          link: "archives",
        },
        {
          name: "公司档案详情",
          link: "Detail",
        },
        {
          name: "基本信息详情",
          link: "InformationDetails",
        },
      ],
    };
  },
  mounted() {
    this.getInfo()
  },
  methods: {
    getInfo(){
      let paramsJson = {
        id:this.$route.query.id
      }
      this.Api.compeletedetail(paramsJson).then((res) => {
        if (res.code == 0) {
          this.infoData = res.data
          this.fileData= (res.data.logoUrl === '' ? [] : [{url:res.data.logoUrl}])
          this.form.lng = res.data.longitude
          this.form.lat = res.data.latitude
        }
      })
    },
  },
};
</script>
<style lang="less" scoped>
.banner {
  width: 1580px;
  min-height: 892px;
  background: white;
  padding: 40px;
  box-sizing: border-box;
}
.pic {
  width: 100px;
  height: 100px;
}
.pic img {
  width: 100px;
  height: 100px;
}
.companyName h3 {
  font-size: 30px;
  font-family: PingFangSC-Medium, PingFang SC;
  font-weight: 500;
  color: rgba(51, 51, 51, 1);
  line-height: 30px;
  margin: 20px 0;
}
.box1 {
  display: flex;
}
.text {
  width: 1418px;
  height: 100px;
}
.a {
  font-size: 14px;
  font-family: PingFangSC-Medium, PingFang SC;
  font-weight: 500;
  color: rgba(51, 51, 51, 1);
  line-height: 36px;
}
.map {
  display: flex;
}
.mapOne {
  width: 600px;
  height: 338px;
  border: 1px solid red;
}
.amap-demo {
  height: 300px;
}
.bm-view {
  width: 100%;
  height: 300px;
}
</style>